if (jQuery){
			jQuery(function($) {

				$('#formSubmit input[type="submit"]').click(function(e){
					e.preventDefault();
					var form = $('#formSubmit');
					var file = $('input[type="file"]', form).val();
					var exts = ['csv'];
					var msg = $('.msg', form);
					msg.hide();

					// first check if file field has any value
					if ( file ) {
						// split file name at dot
						var get_ext = file.split('.');
						// reverse name to check extension
						get_ext = get_ext.reverse();

						// check file type is valid as given in 'exts' array
						if ( $.inArray ( get_ext[0].toLowerCase(), exts ) > -1 ){
						$('#formSubmit').submit();
	
							return true;
							//msg.show().html( '<strong style="color:#090">Allowed extension!</strong>' );
							//$('#formSubmit').submit();
							
							
						} else {
							msg.show().html( '<strong style="color:#f00">Invalid file!</strong>' );
						}
					}else{
						msg.show().html( '<strong style="color:#f00">Select file!</strong>' );
					}
				});

			});
		}
